﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;

using TinyLib.Input;
using TinyLib.Screen;
using TinyLib.Collision;

namespace GodBuilderIdea
{
    public class GameScreen : Screen
    {
        EntityManager m_entity_manager;

        public GameScreen(ScreenManager scr_manager,SpriteBatch sprite_batch,Game game) 
            : base(scr_manager,sprite_batch,game)
        {
            Initialize();
            m_entity_manager = new EntityManager(Game, Spritebatch);
        }

        public override string GetNextScreen()
        {
            return nextScreen;
        }

        public override void Initialize()
        {
            
            base.Initialize();
        }

        public override void HandleInput(ref InputManager inputManager)
        {
            //throw new NotImplementedException();

            m_entity_manager.HandleInput(ref inputManager);
        }

        public override void Shutdown()
        {
            //throw new NotImplementedException();
        }

        public override void Update(GameTime gameTime)
        {
            m_entity_manager.Update(gameTime);
            base.Update(gameTime);
        }

        public override void Draw(GameTime gameTime)
        {
            Spritebatch.Begin();

            m_entity_manager.Draw(gameTime);
            base.Draw(gameTime);

            Spritebatch.End();
        }
    }
}
